<?php
defined('BASEPATH') or exit('No direct script access allowed');

/**
 * @model 账户controller，
 */
class ConfigController extends Admin_Controller
{

	public function __construct()
	{
		try {
			parent::__construct();
			$this->load->service("SService/ConfigService");
		} catch (\TPException $e) {
			exit($e->getRetJson());
		}
	}

	public function getConfigList() {
		$res = $this->ConfigService->getConfigList();
		exit(retSucc($res));
	}

	public function delConfig() {
		$res = $this->ConfigService->delConfig($_POST);
		exit(retSucc($res));
	}

	public function saveConfig() {
		$res = $this->ConfigService->saveConfig($_POST);
		exit(retSucc($res));
	}

	public function getConfigJson() {
		$res = $this->ConfigService->getConfigJson();
		exit(retSucc($res));
	}
}
